package androidx.test.espresso.action;

import android.view.View;

/* loaded from: classes.dex */
final class TranslatedCoordinatesProvider implements CoordinatesProvider {
    final CoordinatesProvider coordinatesProvider;
    final float dx;
    final float dy;

    public TranslatedCoordinatesProvider(CoordinatesProvider coordinatesProvider, float dx, float dy) {
        this.coordinatesProvider = coordinatesProvider;
        this.dx = dx;
        this.dy = dy;
    }

    @Override // androidx.test.espresso.action.CoordinatesProvider
    public float[] calculateCoordinates(View view) {
        float[] calculateCoordinates = this.coordinatesProvider.calculateCoordinates(view);
        calculateCoordinates[0] = calculateCoordinates[0] + (this.dx * view.getWidth());
        calculateCoordinates[1] = calculateCoordinates[1] + (this.dy * view.getHeight());
        return calculateCoordinates;
    }
}
